import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import get from '@dfeidao/atom-mobile/local/get';
import set from '@dfeidao/atom-mobile/local/set';
import render from '@dfeidao/atom-mobile/render/render';

export default async function a010(fd: IFeidaoAiMobile) {
	// 判断输入是否存在为空
	const leave_type = get(fd, "leave_type") as string;
	// console.log("leave_type" + leave_type);
	const start_time = get(fd, "start_time") as string;
	// console.log("start_time" + start_time);
	const end_time = get(fd, "end_time") as string;
	// console.log("end_time" + end_time);
	const time_length = get(fd, "time_length") as number;
	// console.log("time_length" + time_length);
	const content = get(fd, "contents_leave") as string;
	// console.log("contents_leave" + content);
	if (!leave_type || !start_time || !end_time || !time_length || !content) {
		// 存在为空
		const submit_status = false;
		set(fd, "submit_status", submit_status);
		render(fd, { submit_status });
	} else {
		const submit_status = true;
		set(fd, "submit_status", submit_status);
		render(fd, { submit_status });
	}
}
